package com.scy.java.object.abstractTest.firm;
//正式员工
public class SalariedEmployee extends Employee{
    private double monthSalary;//月工资

    public SalariedEmployee(String name, Integer number,
                            MyDate birthday, double monthSalary) {
        super(name, number, birthday);
        this.monthSalary = monthSalary;
    }

    @Override
    public double earning() {
        return monthSalary;
    }

    public void setMonthSalary(double monthSalary) {
        this.monthSalary = monthSalary;
    }

    @Override
    public String toString() {
        return "SalariedEmployee{" +
                super.toString()+
                '}';
    }
}
